var mainview_q=function($){
	$.fn.mainview=function(){
		mainview_c.ddbb.push(this);
		this.payID=mainview_c.ddbb.length-1;
		this.setImagen=mainview_c.setImagen;
		this.clean=mainview_c.clean;
		return this;
	}
}

var mainview_c={
	ddbb:[],
	setImagen:function(imagen){
		this.clean();
		$(this).find(".imagen").css("background","black url('?app=cache&width=400&height=0&path="+imagen.path+"') center center no-repeat");
	},
	clean:function(){
		$(this).find(".imagen").empty();
		$(this).find(".imagen").css("background","transparent");
	}
}

mainview_q(jQuery);
